package com.cywx.base;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by zhulei on 18-2-3.
 * 配置
 */
@Configuration
public class MyWebAppConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor1()).addPathPatterns("/yyy/**");
        registry.addInterceptor(new MyInterceptor2()).addPathPatterns("/api/**");
    }
}
